//
// Created by JYL on 2023-11-08.
//

#ifndef INC_6_HAL_MCP4017_I2C_H
#define INC_6_HAL_MCP4017_I2C_H

#include "main.h"

void I2CStart(void);
void I2CStop(void);
unsigned char I2CWaitAck(void);
void I2CSendAck(void);
void I2CSendNotAck(void);
void I2CSendByte(unsigned char cSendByte);
unsigned char I2CReceiveByte(void);
void I2CInit(void);

void AT24C02_Write(uint8_t address,uint8_t dat);
uint8_t AT24C02_Read(uint8_t address);
void MCP4017_Write(uint8_t val);
uint8_t MCP4017_Read(void);

#endif //INC_6_HAL_MCP4017_I2C_H
